package com.aspose.cells;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;

class zsz {
   private Chart a;
   private Workbook b;
   private znw c;
   private HashMap d;
   private static final com.aspose.cells.b.c.a.za e = new com.aspose.cells.b.c.a.za(new String[]{"[SERIES NAME]", "[CATEGORY NAME]", "[VALUE]", "[CELLRANGE]", "[PERCENTAGE]"});

   zsz(znw var1) {
      this.c = var1;
      this.a = var1.a;
      this.b = var1.a().a;
   }

   private void a() {
      if (this.a.getLegend().A() != null) {
         this.d = new HashMap();
         int var1 = 0;
         int var2 = this.a.getNSeries().getCount();
         zja var3 = this.a.m();

         for(int var4 = 0; var4 < var3.getCount(); ++var4) {
            ziz var5 = var3.a(var4);

            for(int var6 = 0; var6 < this.a.getNSeries().getCount(); ++var6) {
               Series var7 = this.a.getNSeries().get(var6);
               if (var7.s() == var5 && var7.getType() == var5.j()) {
                  this.d.put(var6, var1);
                  var7.b(var1);
                  ++var1;
                  if (var7.o() != null && var7.o().getCount() > 0) {
                     for(int var8 = 0; var8 < var7.getTrendLines().getCount(); ++var8) {
                        this.d.put(var7.getTrendLines().get(var8).d() + this.a.getNSeries().getCount(), var2++);
                     }
                  }
               }
            }
         }
      } else {
         this.d = null;
      }

      this.a.getNSeries().c();
   }

   void a(zcfx var1) throws Exception {
      this.a();
      var1.b(true);
      var1.c("c:chartSpace", (String)null);
      var1.a("xmlns", "c", (String)null, "http://schemas.openxmlformats.org/drawingml/2006/chart");
      var1.a("xmlns", "a", (String)null, "http://schemas.openxmlformats.org/drawingml/2006/main");
      var1.a("xmlns", "r", (String)null, "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
      if (this.a.c() != null && !"".equals(this.a.c())) {
         a(var1, "lang", this.a.c());
      }

      a(var1, "roundedCorners", this.a.isRectangularCornered() ? "0" : "1");
      this.b(var1);
      if (this.a.getPivotSource() != null) {
         this.e(var1);
      }

      this.g(var1);
      this.a(var1, this.a.getChartArea().getShapeProperties());
      if (this.a.getChartArea().g() != null) {
         this.a(var1, this.a.getChartArea().g(), false, 0, (DataLabels)null, false, false, 0);
      }

      this.f(var1);
      this.c(var1);
      var1.b();
      var1.d();
      var1.e();
      this.a.a(false);
   }

   private void b(zcfx var1) throws Exception {
      if (this.a.a != null && this.a.a.e != null) {
         var1.d(this.a.a.e);
      } else if (this.a.a() != -1) {
         var1.b("mc:AlternateContent");
         var1.a("xmlns:mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
         var1.b("mc:Choice");
         var1.a("Requires", "c14");
         var1.a("xmlns:c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart");
         a(var1, "style", zase.y(this.a.a() + 100));
         var1.b();
         var1.b("mc:Fallback");
         a(var1, "style", zase.y(this.a.a()));
         var1.b();
         var1.b();
      }

   }

   private void c(zcfx var1) throws Exception {
      if (this.b()) {
         var1.b("c:extLst");
         if (this.a.a != null && this.a.a.a() != null) {
            Iterator var2 = this.a.a.b().iterator();

            while(var2.hasNext()) {
               String var3 = (String)var2.next();
               var1.d(var3);
            }
         }

         this.d(var1);
         var1.b();
      }
   }

   private boolean b() {
      if (this.a.a != null && this.a.a.a() != null) {
         return true;
      } else {
         return this.a.f();
      }
   }

   private void d(zcfx var1) throws Exception {
      if (this.a.getPivotOptions().a) {
         var1.b("c:ext");
         var1.a("uri", "{781A3756-C4B2-4CAC-9D66-4F8BD8637D16}");
         var1.a("xmlns:c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart");
         var1.b("c14:pivotOptions");
         var1.b("c14:dropZoneFilter");
         var1.a("val", this.a.getPivotOptions().DropZoneFilter ? "1" : "0");
         var1.b();
         var1.b("c14:dropZoneCategories");
         var1.a("val", this.a.getPivotOptions().DropZoneCategories ? "1" : "0");
         var1.b();
         var1.b("c14:dropZoneData");
         var1.a("val", this.a.getPivotOptions().DropZoneData ? "1" : "0");
         var1.b();
         var1.b("c14:dropZoneSeries");
         var1.a("val", this.a.getPivotOptions().DropZoneSeries ? "1" : "0");
         var1.b();
         var1.b("c14:dropZonesVisible");
         var1.a("val", this.a.getPivotOptions().DropZonesVisible ? "1" : "0");
         var1.b();
         var1.b();
         var1.b();
      }
   }

   private void e(zcfx var1) throws Exception {
      var1.c("c:pivotSource", (String)null);
      var1.c("c:name", (String)null);
      var1.a("[0]" + this.a.getPivotSource());
      var1.b();
      var1.b();
   }

   private void f(zcfx var1) throws Exception {
      if (this.c.f != null) {
         var1.c("c:userShapes", (String)null);
         var1.a("r:id", "rId1");
         var1.b();
      }
   }

   private void g(zcfx var1) throws Exception {
      var1.c("c:chart", (String)null);
      if (this.a.n() != null) {
         Title var2 = this.a.n();
         this.a(var1, var2);
         a(var1, "c", "autoTitleDeleted", var2.E() ? "1" : "0");
      }

      if (this.a.a != null && this.a.a.f != null) {
         var1.d(this.a.a.f);
      }

      this.h(var1);
      this.m(var1);
      this.o(var1);
      if (this.a.getPlotVisibleCells()) {
         a(var1, "plotVisOnly", "1");
      } else {
         a(var1, "plotVisOnly", "0");
      }

      a(var1, "dispBlanksAs", zase.ar(this.a.getPlotEmptyCellsType()));
      var1.b();
   }

   private void h(zcfx var1) throws Exception {
      if (this.c()) {
         this.l(var1);
         this.k(var1);
         this.i(var1);
         this.j(var1);
      }
   }

   private void i(zcfx var1) throws Exception {
      Walls var2 = this.a.w();
      if (var2 != null) {
         var1.c("c:sideWall", (String)null);
         this.a(var1, var2.f());
         var1.b();
      }
   }

   private void j(zcfx var1) throws Exception {
      Walls var2 = this.a.u();
      if (var2 != null) {
         var1.c("c:backWall", (String)null);
         this.a(var1, var2.f());
         var1.b();
      }
   }

   private void k(zcfx var1) throws Exception {
      Floor var2 = this.a.s();
      if (var2 != null) {
         var1.c("c:floor", (String)null);
         this.a(var1, var2.f());
         var1.b();
      }
   }

   private void l(zcfx var1) throws Exception {
      var1.c("c:view3D", (String)null);
      a(var1, "rotX", zase.y(this.a.getElevation()));
      if (!this.a.getAutoScaling()) {
         a(var1, "hPercent", zase.a(this.a.getHeightPercent()));
      }

      a(var1, "rotY ", zase.y(this.a.getRotationAngle()));
      a(var1, "depthPercent", zase.y(this.a.getDepthPercent()));
      if (this.a.getRightAngleAxes()) {
         a(var1, "rAngAx", "1");
      } else {
         a(var1, "rAngAx", "0");
         a(var1, "perspective", zase.y(this.a.getPerspective() * 2));
      }

      var1.b();
   }

   private boolean c() {
      zja var1 = this.a.m();

      for(int var2 = 0; var2 < var1.getCount(); ++var2) {
         ziz var3 = var1.a(var2);
         int var4 = var3.j();
         if (ChartCollection.b(var4) && var4 != 13) {
            return true;
         }
      }

      return false;
   }

   private void a(zcfx var1, Title var2) throws Exception {
      if (!var2.E() && var2.isVisible()) {
         var1.c("c:title", (String)null);
         if (var2.getText() != null) {
            this.b(var1, var2);
         }

         boolean var3 = var2.i() && var2.l();
         String var4 = "factor";
         if (var2.b() || var2.c()) {
            var4 = "edge";
         }

         if (var2.t() && var2.y() == 2003 && !var2.isDefaultPosBeSet()) {
            var2.getChart().a(false, false);
            if ("factor".equals(var4)) {
               var2.e(var2.getX() - var2.getDefaultX());
               var2.f(var2.getY() - var2.getDefaultY());
            }
         }

         this.a(var1, (ChartFrame)var2, (String)var4, true, var3, var2.isInnerMode());
         if (!var2.getOverLay()) {
            a(var1, "overlay", "0");
         } else {
            a(var1, "overlay", "1");
         }

         this.a(var1, var2.getShapeProperties());
         if ((var2.getText() == null || var2.getLinkedSource() != null) && var2.g() != null) {
            this.a(var1, var2.getFont(), false, var2.getRotationAngle(), (DataLabels)null, false, false, 0);
         }

         var1.b();
      }
   }

   private void m(zcfx var1) throws Exception {
      var1.c("c:plotArea", (String)null);
      if (this.a.getPlotArea().z()) {
         this.a.a(false, false);
         this.a.getPlotArea().e(false);
         this.a.getPlotArea().f(false);
         this.a.getPlotArea().g(false);
         this.a.getPlotArea().h(false);
         this.a.getPlotArea().setInnerMode(false);
      }

      boolean var2 = (this.a.h() & 255 & 24) != 24 && this.a.getPlotArea().j() && this.a.getPlotArea().k() && this.a.getPlotArea().l();
      this.a(var1, (ChartFrame)this.a.getPlotArea(), (String)"edge", false, var2, this.a.getPlotArea().isInnerMode());
      znv var3 = new znv();
      zja var4 = this.a.m();

      for(int var5 = 0; var5 < var4.getCount(); ++var5) {
         ziz var6 = var4.a(var5);
         int var7 = var6.j();
         if (!ChartCollection.g(var7) && !ChartCollection.j(var7)) {
            if (ChartCollection.n(var7)) {
               this.j(var1, var6);
            } else if (var7 != 44 && var7 != 47 && var7 != 45 && var7 != 48) {
               if (var7 != 49 && var7 != 46) {
                  if (ChartCollection.p(var7)) {
                     this.f(var1, var6);
                  } else if (ChartCollection.k(var7)) {
                     this.d(var1, var6);
                  } else if (ChartCollection.m(var7)) {
                     this.g(var1, var6);
                  } else if (zase.M(var7)) {
                     this.e(var1, var6);
                  } else if (ChartCollection.q(var7)) {
                     this.b(var1, var6);
                  } else if (ChartCollection.r(var7)) {
                     this.a(var1, var6);
                  } else if (ChartCollection.e(var7)) {
                     this.c(var1, var6);
                  }
               } else {
                  this.h(var1, var6);
               }
            } else {
               this.i(var1, var6);
            }
         } else {
            this.k(var1, var6);
         }

         var3.a(var6);
      }

      if (var3.i) {
         if (var3.e) {
            this.a(var1, this.a.getCategoryAxis(), this.a.getValueAxis(), var3.g, var3.c, true);
            this.a(var1, this.a.getValueAxis(), this.a.getCategoryAxis(), var3.g, var3.c, true);
         } else if (var3.a) {
            this.a(var1, this.a.getCategoryAxis(), this.a.getValueAxis(), var3.g, var3.c);
            this.a(var1, this.a.getValueAxis(), this.a.getCategoryAxis(), var3.g, var3.c, false);
         }

         if (var3.b) {
            if (var3.f) {
               this.a(var1, this.a.getSecondCategoryAxis(), this.a.getSecondValueAxis(), var3.h, var3.d, true);
               this.a(var1, this.a.getSecondValueAxis(), this.a.getSecondCategoryAxis(), var3.h, var3.d, true);
            } else {
               this.a(var1, this.a.getSecondCategoryAxis(), this.a.getSecondValueAxis(), var3.h, var3.d);
               this.a(var1, this.a.getSecondValueAxis(), this.a.getSecondCategoryAxis(), var3.h, var3.d, false);
            }
         }

         if (var3.j) {
            this.n(var1);
         }
      }

      this.p(var1);
      this.a(var1, this.a.getPlotArea().getShapeProperties());
      var1.b();
   }

   private void a(zcfx var1, ziz var2) throws Exception {
      var1.c("c:stockChart", (String)null);
      SeriesCollection var3 = this.a.getNSeries();

      for(int var4 = 0; var4 < var3.getCount(); ++var4) {
         Series var5 = var3.get(var4);
         if (var5.s() == var2) {
            this.a(var1, var5, var4);
         }
      }

      if (var2.n()) {
         var1.c("c:hiLowLines", (String)null);
         this.a(var1, var2.U());
         var1.b();
      }

      if (var2.t()) {
         var1.c("c:upDownBars", (String)null);
         if (var2.z() != 150) {
            a(var1, "gapWidth", zase.y(var2.z()));
         }

         var1.c("c:upBars", (String)null);
         DropBars var6 = var2.u();
         this.a(var1, var6.c());
         var1.b();
         var1.c("c:downBars", (String)null);
         var6 = var2.v();
         this.a(var1, var6.c());
         var1.b();
         var1.b();
      }

      this.l(var1, var2);
      var1.b();
   }

   private void b(zcfx var1, ziz var2) throws Exception {
      var1.c("c:bubbleChart", (String)null);
      String var3 = var2.y() ? "1" : "0";
      a(var1, "varyColors", var3);
      SeriesCollection var4 = this.a.getNSeries();

      for(int var5 = 0; var5 < var4.getCount(); ++var5) {
         Series var6 = var4.get(var5);
         if (var6.s() == var2) {
            this.a(var1, var6, var5);
         }
      }

      if (var2.G() != 100) {
         a(var1, "bubbleScale", zase.y(var2.G()));
      }

      a(var1, "showNegBubbles", var2.I() ? "1" : "0");
      if (var2.H() == 1) {
         a(var1, "sizeRepresents", "w");
      }

      this.l(var1, var2);
      var1.b();
   }

   private void c(zcfx var1, ziz var2) throws Exception {
      if (var2.j() != 69 && var2.j() != 70) {
         var1.c("c:surfaceChart", (String)null);
      } else {
         var1.c("c:surface3DChart", (String)null);
      }

      if (var2.j() == 72 || var2.j() == 70) {
         a(var1, "wireframe", "1");
      }

      SeriesCollection var3 = this.a.getNSeries();

      for(int var4 = 0; var4 < var3.getCount(); ++var4) {
         Series var5 = var3.get(var4);
         if (var5.s() == var2) {
            this.a(var1, var5, var4);
         }
      }

      this.l(var1, var2);
      var1.b();
   }

   private void d(zcfx var1, ziz var2) throws Exception {
      var1.c("c:scatterChart", (String)null);
      String var3 = zase.L(var2.j());
      a(var1, "scatterStyle", var3);
      String var4 = var2.y() ? "1" : "0";
      a(var1, "varyColors", var4);
      SeriesCollection var5 = this.a.getNSeries();

      for(int var6 = 0; var6 < var5.getCount(); ++var6) {
         Series var7 = var5.get(var6);
         if (var7.s() == var2) {
            this.a(var1, var7, var6);
         }
      }

      this.l(var1, var2);
      var1.b();
   }

   private void e(zcfx var1, ziz var2) throws Exception {
      var1.c("c:radarChart", (String)null);
      String var3 = zase.N(var2.j());
      a(var1, "radarStyle", var3);
      String var4 = var2.y() ? "1" : "0";
      a(var1, "varyColors", var4);
      SeriesCollection var5 = this.a.getNSeries();

      for(int var6 = 0; var6 < var5.getCount(); ++var6) {
         Series var7 = var5.get(var6);
         if (var7.s() == var2) {
            this.a(var1, var7, var6);
         }
      }

      this.l(var1, var2);
      var1.b();
   }

   private void f(zcfx var1, ziz var2) throws Exception {
      boolean var3 = ChartCollection.b(var2.j());
      if (var3) {
         var1.c("c:area3DChart", (String)null);
      } else {
         var1.c("c:areaChart", (String)null);
      }

      String var4 = zase.G(var2.j());
      a(var1, "grouping", var4);
      String var5 = var2.y() ? "1" : "0";
      a(var1, "varyColors", var5);
      SeriesCollection var6 = this.a.getNSeries();

      for(int var7 = 0; var7 < var6.getCount(); ++var7) {
         Series var8 = var6.get(var7);
         if (var8.s() == var2) {
            this.a(var1, var8, var7);
         }
      }

      if (var2.r()) {
         var1.c("c:dropLines", (String)null);
         this.a(var1, var2.T());
         var1.b();
      }

      if (var3 && this.a.getGapDepth() != 150) {
         a(var1, "gapDepth", zase.y(this.a.getGapDepth()));
      }

      this.l(var1, var2);
      var1.b();
   }

   private void g(zcfx var1, ziz var2) throws Exception {
      var1.c("c:doughnutChart", (String)null);
      String var3 = var2.y() ? "1" : "0";
      a(var1, "varyColors", var3);
      SeriesCollection var4 = this.a.getNSeries();

      for(int var5 = 0; var5 < var4.getCount(); ++var5) {
         Series var6 = var4.get(var5);
         if (var6.s() == var2) {
            this.a(var1, var6, var5);
         }
      }

      if (var2.A() != 0) {
         a(var1, "firstSliceAng", zase.y(var2.A()));
      }

      a(var1, "holeSize", zase.y(var2.J()));
      var1.b();
   }

   private void h(zcfx var1, ziz var2) throws Exception {
      var1.c("c:ofPieChart", (String)null);
      String var3 = var2.j() == 49 ? "bar" : "pie";
      a(var1, "ofPieType", var3);
      var3 = var2.y() ? "1" : "0";
      a(var1, "varyColors", var3);
      SeriesCollection var4 = this.a.getNSeries();

      for(int var5 = 0; var5 < var4.getCount(); ++var5) {
         Series var6 = var4.get(var5);
         if (var6.s() == var2) {
            this.a(var1, var6, var5);
         }
      }

      if (var2.z() != 150) {
         a(var1, "gapWidth", zase.y(var2.z()));
      }

      if (!var2.F()) {
         var3 = zase.J(var2.D());
         a(var1, "splitType", var3);
         a(var1, "splitPos", zase.b(var2.E()));
      }

      a(var1, "secondPieSize", zase.y(var2.C()));
      Line var7 = var2.q();
      if (var7 != null) {
         var1.c("c:serLines", (String)null);
         this.a(var1, var2.S());
         var1.b();
      }

      var1.b();
   }

   private void i(zcfx var1, ziz var2) throws Exception {
      if (var2.j() != 45 && var2.j() != 48) {
         var1.c("c:pieChart", (String)null);
      } else {
         var1.c("c:pie3DChart", (String)null);
      }

      String var3 = var2.y() ? "1" : "0";
      a(var1, "varyColors", var3);
      SeriesCollection var4 = this.a.getNSeries();

      for(int var5 = 0; var5 < var4.getCount(); ++var5) {
         Series var6 = var4.get(var5);
         if (var6.s() == var2) {
            this.a(var1, var6, var5);
         }
      }

      if (var2.A() != 0) {
         a(var1, "firstSliceAng", zase.y(var2.A()));
      }

      var1.b();
   }

   private void j(zcfx var1, ziz var2) throws Exception {
      if (var2.j() == 43) {
         var1.c("c:line3DChart", (String)null);
      } else {
         var1.c("c:lineChart", (String)null);
      }

      String var3 = zase.H(var2.j());
      a(var1, "grouping", var3);
      String var4 = var2.y() ? "1" : "0";
      a(var1, "varyColors", var4);
      SeriesCollection var5 = this.a.getNSeries();

      for(int var6 = 0; var6 < var5.getCount(); ++var6) {
         Series var7 = var5.get(var6);
         if (var7.s() == var2) {
            this.a(var1, var7, var6);
         }
      }

      if (var2.r()) {
         var1.c("c:dropLines", (String)null);
         this.a(var1, var2.T());
         var1.b();
      }

      if (var2.n()) {
         var1.c("c:hiLowLines", (String)null);
         this.a(var1, var2.U());
         var1.b();
      }

      if (var2.t()) {
         var1.c("c:upDownBars", (String)null);
         if (var2.z() != 150) {
            a(var1, "gapWidth", zase.y(var2.z()));
         }

         var1.c("c:upBars", (String)null);
         DropBars var8 = var2.u();
         this.a(var1, var8.c());
         var1.b();
         var1.c("c:downBars", (String)null);
         var8 = var2.v();
         this.a(var1, var8.c());
         var1.b();
         var1.b();
      }

      a(var1, "marker", "1");
      if (var2.j() == 43 && this.a.getGapDepth() != 150) {
         a(var1, "gapDepth", zase.y(this.a.getGapDepth()));
      }

      this.l(var1, var2);
      var1.b();
   }

   private void k(zcfx var1, ziz var2) throws Exception {
      boolean var3 = ChartCollection.b(var2.j());
      if (var3) {
         var1.c("c:bar3DChart", (String)null);
      } else {
         var1.c("c:barChart", (String)null);
      }

      String var4 = null;
      String var5 = null;
      String[] var6 = new String[]{var4};
      String[] var7 = new String[]{var5};
      zase.a(var2.j(), var6, var7);
      var4 = var6[0];
      var5 = var7[0];
      a(var1, "barDir", var4);
      a(var1, "grouping", var5);
      String var8 = var2.y() ? "1" : "0";
      a(var1, "varyColors", var8);
      SeriesCollection var9 = this.a.getNSeries();

      for(int var10 = 0; var10 < var9.getCount(); ++var10) {
         Series var11 = var9.get(var10);
         if (var11.s() == var2) {
            this.a(var1, var11, var10);
         }
      }

      if (var2.B() != 0) {
         a(var1, "overlap", zase.y(var2.B()));
      }

      if (var2.z() != 150) {
         a(var1, "gapWidth", zase.y(var2.z()));
      }

      if (var3 && this.a.getGapDepth() != 150) {
         a(var1, "gapDepth", zase.y(this.a.getGapDepth()));
      }

      if (var3) {
         String var12 = zase.O(var2.j());
         if (var12 != null) {
            a(var1, "shape", var12);
         }
      }

      Line var13 = var2.q();
      if (var2.p() && var13 != null) {
         var1.c("c:serLines", (String)null);
         this.a(var1, var2.S());
         var1.b();
      }

      this.l(var1, var2);
      if (var2.a != null) {
         var1.d(var2.a);
      }

      var1.b();
   }

   private void a(zcfx var1, Series var2, int var3) throws Exception {
      int var4 = var2.s().j();
      boolean var5 = ChartCollection.g(var4) || ChartCollection.j(var4);
      boolean var6 = ChartCollection.n(var4) || ChartCollection.r(var4);
      boolean var7 = ChartCollection.c(var4) || ChartCollection.m(var4);
      boolean var8 = ChartCollection.p(var4);
      boolean var9 = ChartCollection.k(var4);
      boolean var10 = zase.M(var4);
      boolean var11 = ChartCollection.q(var4);
      boolean var12 = ChartCollection.b(var4);
      boolean var13 = ChartCollection.e(var4);
      var1.c("c:ser", (String)null);
      a(var1, "idx", zase.y(var2.a()));
      a(var1, "order", zase.y(var2.z()));
      this.g(var1, var2);
      if (var4 == 69 || var4 == 70) {
         var2.getShapeProperties().j();
      }

      this.a(var1, var2.getShapeProperties());
      if (var7) {
         a(var1, "explosion", zase.y(var2.getExplosion()));
      }

      if (var5 || var11) {
         a(var1, "invertIfNegative", var2.getArea().getInvertIfNegative() ? "1" : "0");
      }

      if (var5 || var8) {
         this.c(var1, var2);
      }

      if ((var6 || var9 || var10) && var2.v() != null) {
         this.a(var1, var2.getMarker(), var2.getShadow(), var2);
      }

      if (var2.b() != null) {
         ChartPointCollection var14 = var2.getPoints();
         boolean var15 = this.a(var2);

         for(int var16 = 0; var16 < var14.a(); ++var16) {
            ChartPoint var17 = var14.c(var16);
            if (!var17.e()) {
               var1.c("c:dPt", (String)null);
               a(var1, "idx", zase.y(var17.a));
               if (var7 && var17.getExplosion() != var2.getExplosion()) {
                  a(var1, "explosion", zase.y(var17.getExplosion()));
               }

               boolean var18 = false;
               if (var5 || var11) {
                  a(var1, "invertIfNegative", var17.getArea().getInvertIfNegative() ? "1" : "0");
                  if (var17.getArea().getInvertIfNegative() && var2.l() != null && var2.l().d() != null && var17.a < var2.l().d().size() && var2.l().d().get(var17.a) instanceof Double && (Double)((Double)var2.l().d().get(var17.a)) < 0.0D) {
                     var18 = true;
                  }
               }

               if (!var18 && !var15) {
                  this.a(var1, var17.getShapeProperties());
               }

               if ((var6 || var9 || var10) && var17.h() != null) {
                  this.a(var1, var17.getMarker(), var17.getShadow(), var17);
               }

               var1.b();
            }
         }
      }

      this.f(var1, var2);
      if (!var7 && !var10 && var2.o() != null && var2.getTrendLines().getCount() > 0) {
         this.a(var1, var2.getTrendLines());
      }

      if (!var7 && !var10 && var2.x() != null && var2.getYErrorBar().getDisplayType() != 2) {
         this.a(var1, var2.getYErrorBar());
      }

      if (var9 && var2.w() != null && var2.getXErrorBar().getDisplayType() != 2) {
         this.a(var1, var2.getXErrorBar());
      }

      if (!var9 && !var11) {
         this.d(var1, var2);
         this.e(var1, var2);
      } else {
         if (var2.m() != null) {
            var1.c("c:xVal", (String)null);
            this.a(var1, var2.m(), true, false);
            var1.b();
         }

         if (var2.l() != null) {
            var1.c("c:yVal", (String)null);
            this.a(var1, var2.l(), false, false);
            var1.b();
         }
      }

      if (var11) {
         if (var2.n() != null) {
            var1.c("c:bubbleSize", (String)null);
            this.a(var1, var2.n(), false, false);
            var1.b();
         }

         if (var2.getHas3DEffect()) {
            a(var1, "bubble3D", "1");
         }
      }

      if (var6 || var9) {
         if (var2.getSmooth()) {
            a(var1, "smooth", "1");
         } else {
            a(var1, "smooth", "0");
         }
      }

      if (var5 && var12) {
         String var19 = zase.P(var2.getBar3DShapeType());
         if (var19 != null) {
            a(var1, "shape", var19);
         }
      }

      this.a(var1, var2, var5, var11);
      var1.b();
   }

   private boolean a(Series var1) {
      if (var1.b() != null) {
         ShapePropertyCollection var2 = var1.getShapeProperties();
         ChartPointCollection var3 = var1.b();
         int var4 = var3.getCount();

         for(int var5 = 0; var5 < var4; ++var5) {
            ChartPoint var6 = var3.get(var5);
            if (!var6.getShapeProperties().a(var2, (zma)null)) {
               return false;
            }
         }
      }

      return true;
   }

   private void a(zcfx var1, Series var2, boolean var3, boolean var4) throws Exception {
      if (this.a(var2, var3, var3)) {
         var1.b("c:extLst");
         if (var2.a != null && var2.a.a() != null) {
            Iterator var5 = var2.a.b().iterator();

            while(var5.hasNext()) {
               String var6 = (String)var5.next();
               var1.d(var6);
            }
         }

         if ((var3 || var4) && var2.getArea().getInvertIfNegative() && var2.getArea().getFillFormat().getType() == 2) {
            this.b(var1, var2);
         }

         if (var2.getDataLabels().n != null) {
            this.a(var1, var2);
         }

         var1.b();
      }
   }

   private boolean a(Series var1, boolean var2, boolean var3) {
      if (var1.a != null && var1.a.a() != null) {
         return true;
      } else if ((var2 || var3) && var1.getArea().getInvertIfNegative() && var1.getArea().getFillFormat().getType() == 2) {
         return true;
      } else {
         return var1.getDataLabels().n != null;
      }
   }

   private void a(zcfx var1, Series var2) throws Exception {
      zik var3 = var2.getDataLabels().n;
      var1.b("c:ext");
      var1.a("uri", "{02D57815-91ED-43cb-92C2-25804820EDAC}");
      var1.a("xmlns:c15", "http://schemas.microsoft.com/office/drawing/2012/chart");
      var1.b("c15:datalabelsRange");
      var1.b("c15:f");
      String var4 = this.a(var3);
      var1.a(var4);
      var1.b();
      if (var3.d() != null && var3.d().size() > 0) {
         this.a(var1, var3, "c15:dlblRangeCache");
      }

      var1.b();
      var1.b();
   }

   private void b(zcfx var1, Series var2) throws Exception {
      var1.b("c:ext");
      var1.a("uri", "{6F2FDCE9-48DA-4B69-8628-5D25D57E5C99}");
      var1.a("xmlns:c14", "http://schemas.microsoft.com/office/drawing/2007/8/2/chart");
      var1.b("c14:invertSolidFillFmt");
      var1.b("c14:spPr");
      var1.c("a:solidFill", (String)null);
      ztj.a(var1, var2.getArea().getFillFormat().getSolidFill().b, this.b, false);
      var1.b();
      var1.b();
      var1.b();
      var1.b();
   }

   private void c(zcfx var1, Series var2) throws Exception {
      if (var2.d() != null) {
         if (var2.getArea().getFormatting() == 2 && var2.getArea().getFillFormat().getType() == 4) {
            TextureFill var3 = var2.getArea().getFillFormat().getTextureFill();
            if (!var3.isTiling()) {
               PicFormatOption var4 = var3.getPicFormatOption();
               var1.c("c:pictureOptions", (String)null);
               if (!var4.c()) {
                  a(var1, "c", "applyToFront", "0");
               }

               if (!var4.b()) {
                  a(var1, "c", "applyToSides", "0");
               }

               if (!var4.d()) {
                  a(var1, "c", "applyToEnd", "0");
               }

               String var5 = zase.al(var4.getType());
               a(var1, "c", "pictureFormat", var5);
               if (var4.getType() == 2) {
                  a(var1, "c", "pictureStackUnit", zase.b(var4.getScale()));
               }

               var1.b();
            }
         }

      }
   }

   private void d(zcfx var1, Series var2) throws Exception {
      zik var3 = var2.m();
      if (var3 != null) {
         var1.c("c:cat", (String)null);
         zaay var4 = this.c.a().y;
         if (var4.d != this.a.getWorksheet()) {
            var4.a(this.a.getWorksheet());
         }

         var4.a = 2;
         var4.f = this.a;
         var4.g = 0;
         var4.h = 0;
         boolean var5 = zio.a(var3, var4);
         this.a(var1, var3, true, var5);
         var1.b();
      }
   }

   private String a(zik var1) {
      String var2 = var1.h();
      if (var2 != null) {
         if (var1.q() == 4 && var2.indexOf(33) == -1) {
            if (var2.charAt(0) == '=') {
               var2 = "[0]!" + var2.substring(1);
            } else {
               var2 = "[0]!" + var2;
            }
         }

         var2 = zase.H(var2);
         if ((var1.q() == 1 || var1.q() == 6) && var2.charAt(0) != '(' && var2.indexOf(44) != -1 && var2.charAt(0) != '{') {
            var2 = "{" + var2 + "}";
         }

         return var2;
      } else {
         return null;
      }
   }

   private void a(zcfx var1, zik var2, boolean var3, boolean var4) throws Exception {
      String var5;
      if (var2.f() != null && var2.f().length > 0) {
         var5 = this.a(var2);
         if (var5 != null) {
            boolean var6 = true;
            String var7 = "numRef";
            if (var4) {
               var7 = "multiLvlStrRef";
            } else if (var3) {
               var6 = this.a(var2, var4);
               var7 = var6 ? "numRef" : "strRef";
            }

            var1.c("c:" + var7, (String)null);
            var1.c("c:f", (String)null);
            var1.a(var5);
            var1.b();
            if (var4) {
               this.a(var1, var2);
            } else {
               var7 = var6 ? "numCache" : "strCache";
               this.a(var1, var2, "c:" + var7);
            }

            var1.b();
         }
      } else {
         var5 = var2.q() == 1 ? "numLit" : "strLit";
         if (var2.q() == 6 && !var3 && this.a(var2.d())) {
            var5 = "numLit";
         }

         this.a(var1, var2, "c:" + var5);
      }

   }

   private boolean a(ArrayList var1) {
      for(int var2 = 0; var2 < var1.size(); ++var2) {
         try {
            Object var3 = var1.get(var2);
            if (var3 != null) {
               if (var3 instanceof String) {
                  if (!"".equals((String)var3) && !"#N/A".equals((String)var3)) {
                     return false;
                  }
               } else if (!(var3 instanceof Double)) {
                  return false;
               }
            }
         } catch (Exception var4) {
            return false;
         }
      }

      return true;
   }

   private boolean a(zik var1, boolean var2) {
      if (var1.q() == 1) {
         return true;
      } else if (var1.d() != null && var1.d().size() > 0 && !var2) {
         return this.a(var1.d());
      } else {
         byte var3 = 0;
         int[] var4 = new int[]{var3};
         ArrayList var5 = var1.a(var1.c(), false, var4);
         int var12 = var4[0];
         if (var5 != null && var5.size() != 0) {
            int var6;
            if (var12 == 1) {
               for(var6 = 0; var6 < var5.size(); ++var6) {
                  zit var7 = (zit)var5.get(var6);
                  if (var7.g == 5) {
                     return false;
                  }
               }
            } else {
               var6 = var5.size();
               int var13 = ((ArrayList)var5.get(0)).size();

               for(int var8 = 0; var8 < var6; ++var8) {
                  ArrayList var9 = (ArrayList)var5.get(var8);

                  for(int var10 = 0; var10 < var9.size(); ++var10) {
                     zit var11 = (zit)var9.get(var10);
                     if (var11.g == 5) {
                        return false;
                     }
                  }
               }
            }

            return true;
         } else {
            return false;
         }
      }
   }

   private void a(ArrayList var1, ArrayList var2) {
      int var3 = 0;
      ArrayList var4 = new ArrayList();

      int var5;
      for(var5 = 0; var5 < var2.size(); ++var5) {
         String var6 = (String)var2.get(var5);
         if (var6 != null) {
            String[] var7 = com.aspose.cells.b.a.zv.d(var6, '\n');
            if (var7.length > var3) {
               var3 = var7.length;
            }

            com.aspose.cells.b.a.a.ze.a(var4, (Object)var7);
         }
      }

      for(var5 = 0; var5 < var3; ++var5) {
         ArrayList var9 = new ArrayList(var2.size());

         for(int var10 = 0; var10 < var4.size(); ++var10) {
            String[] var8 = (String[])((String[])var4.get(var10));
            if (var5 >= var8.length) {
               com.aspose.cells.b.a.a.ze.a(var9, (Object)"");
            } else {
               com.aspose.cells.b.a.a.ze.a(var9, (Object)var8[var5]);
            }
         }

         com.aspose.cells.b.a.a.ze.a(var1, (Object)var9);
      }

   }

   private void a(zcfx var1, zik var2) throws Exception {
      String var3 = "multiLvlStrCache";
      if (var2.d() != null && var2.d().size() > 0) {
         ArrayList var4 = var2.d();
         int var5 = var4.size();
         if (var5 > 0) {
            var1.c("c:" + var3, (String)null);
            a(var1, "c", "ptCount", zase.y(var5));
            ArrayList var6 = new ArrayList();
            this.a(var6, var4);

            for(int var7 = 0; var7 < var6.size(); ++var7) {
               ArrayList var8 = (ArrayList)var6.get(var7);
               var1.c("c:lvl", (String)null);

               for(int var9 = 0; var9 < var8.size(); ++var9) {
                  String var10 = (String)var8.get(var9);
                  if (var10 != null && var10.length() > 0) {
                     var1.c("c:pt", (String)null);
                     var1.a("idx", zase.y(var9));
                     var1.c("c:v", (String)null);
                     var1.a(var10);
                     var1.b();
                     var1.b();
                  }
               }

               var1.b();
            }

            var1.b();
         }
      } else if (var2.d() != null && this.a.getPivotSource() != null || var2.k() > 0 && var2.b()) {
         var1.c("c:" + var3, (String)null);
         var1.b();
      }

   }

   private void a(zcfx var1, zik var2, String var3) throws Exception {
      if (var2.d() != null && var2.d().size() > 0) {
         ArrayList var4 = var2.d();
         int var5 = var4.size();
         if (var5 > 0) {
            var1.c(var3, (String)null);
            if (var2.e() != null && !"".equals(var2.e()) && !var3.equals("c:strCache")) {
               var1.c("c:formatCode", (String)null);
               var1.a(var2.e());
               var1.b();
            }

            a(var1, "c", "ptCount", zase.y(var5));

            for(int var6 = 0; var6 < var5; ++var6) {
               Object var7 = var4.get(var6);
               if (var7 != null && com.aspose.cells.b.a.zr.a(var7).length() > 0) {
                  var1.c("c:pt", (String)null);
                  var1.a("idx", zase.y(var6));
                  var1.c("c:v", (String)null);
                  if (var7 instanceof Double) {
                     var1.a(zase.b((Double)var7));
                  } else {
                     var1.a(com.aspose.cells.b.a.zr.a(var7));
                  }

                  var1.b();
                  var1.b();
               }
            }

            var1.b();
         }
      } else if (var2.d() != null && this.a.getPivotSource() != null || var2.k() > 0 && var2.b()) {
         var1.c(var3, (String)null);
         var1.b();
      } else if (var2.d() == null && var2.g()) {
         var1.c(var3, (String)null);
         var1.b();
      }

   }

   private void e(zcfx var1, Series var2) throws Exception {
      if (var2.l() != null) {
         var1.c("c:val", (String)null);
         this.a(var1, var2.l(), false, false);
         var1.b();
      }
   }

   private void a(zcfx var1, Marker var2, boolean var3, Object var4) throws Exception {
      int var5 = var2.getMarkerStyle();
      var1.c("c:marker", (String)null);
      if (var5 == 5) {
         a(var1, "symbol", "none");
      } else {
         if (var5 != 0) {
            boolean var6 = true;
            if (var4 instanceof ChartPoint) {
               Series var7 = ((ChartPoint)var4).a();
               Marker var8 = var7.v();
               if (var8 != null && var8.getMarkerStyle() == var5) {
                  var6 = false;
               }
            }

            if (var6) {
               String var9 = zase.I(var5);
               a(var1, "symbol", var9);
            }
         }

         if (!var2.a) {
            a(var1, "size", zase.y(var2.getMarkerSize()));
         }

         if (!var2.i().i()) {
            var2.i().a(var3);
         }

         this.a(var1, var2.i());
      }

      var1.b();
   }

   private boolean b(Series var1) {
      DataLabels var2 = var1.p();
      if (var2 != null) {
         return true;
      } else {
         if (var1.b() != null) {
            ChartPointCollection var3 = var1.getPoints();

            for(int var4 = 0; var4 < var3.a(); ++var4) {
               ChartPoint var5 = var3.c(var4);
               if (var5.j() != null) {
                  return true;
               }
            }
         }

         return false;
      }
   }

   private void a(zcfx var1, DataLabels var2, int var3) throws Exception {
      var1.c("c:layout", (String)null);
      var1.c("c:manualLayout", (String)null);
      if (var2.s()) {
         if (!var2.isDefaultPosBeSet()) {
            var2.getChart().a(false, false);
         }

         var2.i(var2.getX() - var2.getDefaultX());
         var2.j(var2.getY() - var2.getDefaultY());
      } else if (var2.t() && var2.y() == 2003) {
         if (!var2.isDefaultPosBeSet()) {
            var2.getChart().a(false, false);
         }

         var2.i(var2.getX() - var2.getDefaultX());
         var2.j(var2.getY() - var2.getDefaultY());
      }

      a(var1, "x", zase.b((double)var2.u() / 4000.0D));
      a(var1, "y", zase.b((double)var2.v() / 4000.0D));
      var1.b();
      var1.b();
   }

   private void f(zcfx var1, Series var2) throws Exception {
      if (this.b(var2)) {
         int var3 = var2.s().j();
         DataLabels var4 = var2.p();
         var1.c("c:dLbls", (String)null);
         String var20;
         if (var2.b() != null) {
            ChartPointCollection var5 = var2.getPoints();

            for(int var6 = 0; var6 < var5.a(); ++var6) {
               ChartPoint var7 = var5.c(var6);
               if (var7.j() != null && var4 != null && !var4.d(var7.j()) || var4 == null && var7.j() != null || var7.j() != null && (!var7.j().i() || var7.j().s()) || var7.j() != null && var7.j().z() != null && var7.j().z().length() > 0) {
                  DataLabels var8 = var7.j();
                  var1.c("c:dLbl", (String)null);
                  a(var1, "c", "idx", zase.y(var7.a));
                  if (!var8.isDeleted() && var8.R()) {
                     if (var8.i() && !var8.s() && !var8.t()) {
                        var1.b("c:layout", (String)null);
                     } else {
                        this.a(var1, (DataLabels)var8, 1);
                     }

                     if (var8.I()) {
                        var1.c("c:numFmt", (String)null);
                        String var9 = this.a(var8);
                        var1.a("formatCode", var9);
                        var1.a("sourceLinked", var8.H() ? "1" : "0");
                        var1.b();
                     }

                     boolean var18 = this.a(var1, var8.getShapeProperties());
                     if (!var18 && var8.getRotationAngle() != 0) {
                        var1.b("c:spPr", (String)null);
                     }

                     if (var8.z() != null && var8.z().length() > 0 || var8.n != null || var2.getDataLabels().n != null) {
                        this.b(var1, var8, true);
                     }

                     Font var10;
                     if (var4 == null || !a(var4.D(), var8.D()) || var8.getRotationAngle() != 0 || var8.I() && var8.L() instanceof ChartPoint) {
                        var10 = var8.g();
                        if (var10 == null && var8.getRotationAngle() != 0) {
                           var10 = var8.getFont();
                        }

                        this.a(var1, var10, false, var8.getRotationAngle(), var8, var8.A(), var8.B(), var8.getTextDirection());
                     } else if (var18) {
                        var10 = var8.getFont();
                        if (var10 == null && var8.getRotationAngle() != 0) {
                           var10 = var8.getFont();
                        }

                        this.a(var1, var10, false, var8.getRotationAngle(), var8, var8.A(), var8.B(), var8.getTextDirection());
                     }

                     if (!var8.r && var8.getPosition() != 9) {
                        var20 = zase.c(var8.getPosition(), var3);
                        if (var20 != null) {
                           a(var1, "c", "dLblPos", var20);
                        }
                     } else if (var4 != null && !var4.r && var4.getPosition() != 9) {
                        var20 = zase.c(var4.getPosition(), var3);
                        if (var20 != null) {
                           a(var1, "c", "dLblPos", var20);
                        }
                     }

                     this.a(var1, var8, false);
                     this.a(var1, var8);
                  } else {
                     var1.b("c:delete", "1");
                  }

                  var1.b();
               }
            }
         }

         if (var4 != null) {
            var1.c("c:numFmt", (String)null);
            String var11 = this.a(var4);
            var1.a("formatCode", var11);
            if (var4.getNumberFormatLinked()) {
               var1.a("sourceLinked", "1");
            } else {
               var1.a("sourceLinked", "0");
            }

            var1.b();
            this.a(var1, var4.getShapeProperties());
            if (!a(this.a.getChartArea().g(), var4.D()) || var4.getRotationAngle() != 0) {
               Font var13 = var4.g();
               if (var4.getRotationAngle() != 0) {
                  var13 = var4.getFont();
               }

               this.a(var1, var13, false, var4.getRotationAngle(), var4, var4.A(), var4.B(), var4.getTextDirection());
            }

            if (!var4.r) {
               String var15 = zase.c(var4.getPosition(), var3);
               if (var15 != null) {
                  a(var1, "c", "dLblPos", var15);
               }
            }

            this.a(var1, var4, true);
            if (var4.isDeleted()) {
               a(var1, "c", "delete", "1");
            }
         } else {
            a(var1, "c", "delete", "1");
         }

         boolean var12 = ChartCollection.c(var2.getType()) || ChartCollection.m(var2.getType());
         if (var12 && var2.s().O() != null) {
            var1.c("c:leaderLines", (String)null);
            this.a(var1, var2.s().V());
            var1.b();
         }

         boolean var16 = !var12 && var2.hasLeaderLines();
         boolean var14 = var4 != null && var4.getShowCellRange();
         boolean var17 = var4 != null && var4.m != null || var16 || var14;
         if (var17) {
            var1.b("c:extLst");
            if (var4.m != null) {
               Iterator var19 = var4.m.iterator();

               while(var19.hasNext()) {
                  var20 = (String)var19.next();
                  var1.d(var20);
               }
            }

            if (var16 || var14) {
               var1.b("c:ext");
               var1.a("uri", "{CE6537A1-D6FC-4f65-9D91-7224C49458BB}");
               var1.a("xmlns:c15", "http://schemas.microsoft.com/office/drawing/2012/chart");
               if (var14) {
                  a(var1, "c15", "showDataLabelsRange", "1");
               }

               if (var16 && var2.hasLeaderLines()) {
                  a(var1, "c15", "showLeaderLines", var2.hasLeaderLines() ? "1" : "0");
                  if (var2.s().O() != null) {
                     var1.c("c15:leaderLines", (String)null);
                     this.a(var1, var2.s().V());
                     var1.b();
                  }
               }

               var1.b();
            }

            var1.b();
         }

         var1.b();
      }
   }

   private void a(zcfx var1, DataLabels var2) throws Exception {
      if (var2.getShowCellRange()) {
         var1.b("c:extLst");
         var1.b("c:ext");
         var1.a("uri", "{CE6537A1-D6FC-4f65-9D91-7224C49458BB}");
         var1.a("xmlns:c15", "http://schemas.microsoft.com/office/drawing/2012/chart");
         if (var2.getShowCellRange()) {
            a(var1, "c15", "showDataLabelsRange", "1");
         }

         var1.b();
         var1.b();
      }
   }

   private void a(zcfx var1, DataLabels var2, boolean var3) throws Exception {
      if (var2 == null) {
         a(var1, "showVal", "0");
         a(var1, "showCatName", "0");
         a(var1, "showSerName", "0");
         a(var1, "showPercent", "0");
         a(var1, "showBubbleSize", "0");
         a(var1, "showLeaderLines", "0");
      } else {
         String var4 = null;
         if (var2.K() && var2.J() != 0) {
            var4 = var2.getSeparatorValue();
         }

         a(var1, "showLegendKey", var2.getShowLegendKey() ? "1" : "0");
         String var5 = var2.getShowValue() ? "1" : "0";
         a(var1, "showVal", var5);
         var5 = var2.getShowCategoryName() ? "1" : "0";
         a(var1, "showCatName", var5);
         var5 = var2.getShowSeriesName() ? "1" : "0";
         a(var1, "showSerName", var5);
         var5 = var2.getShowPercentage() ? "1" : "0";
         a(var1, "showPercent", var5);
         var5 = var2.getShowBubbleSize() ? "1" : "0";
         a(var1, "showBubbleSize", var5);
         if (var3) {
            var5 = ((Series)var2.L()).hasLeaderLines() ? "1" : "0";
            a(var1, "showLeaderLines", var5);
         }

         if (var4 != null) {
            var1.b("c:separator", var4);
         }
      }

   }

   private void a(zcfx var1, Axis var2, boolean var3) throws Exception {
      String var4 = "minMax";
      if (var2.isPlotOrderReversed()) {
         var4 = "maxMin";
      }

      var1.c("c:scaling", (String)null);
      if (var2.isLogarithmic()) {
         a(var1, "logBase", zase.b(var2.getLogBase()));
      }

      a(var1, "orientation", var4);
      String var5;
      if (!var2.f()) {
         var5 = this.a(var2.getMaxValue(), var3);
         a(var1, "max", var5);
      }

      if (!var2.e()) {
         var5 = this.a(var2.getMinValue(), var3);
         a(var1, "min", var5);
      }

      var1.b();
   }

   private String a(Object var1, boolean var2) {
      String var3;
      if (var1 instanceof Double) {
         double var4 = (Double)var1;
         if (var2) {
            var4 *= 0.01D;
         }

         var3 = zase.b(var4);
      } else if (var1 instanceof DateTime) {
         DateTime var6 = (DateTime)var1;
         var3 = zase.b(var6.h());
      } else {
         var3 = com.aspose.cells.b.a.zr.a(var1);
      }

      return var3;
   }

   private void a(zcfx var1, Axis var2) throws Exception {
      if (var2.n() != null) {
         this.a(var1, var2.n());
      }

      if (var2.o() != null || zase.M(this.a.getType())) {
         var1.c("c:majorGridlines", (String)null);
         this.a(var1, var2.s());
         var1.b();
      }

      if (var2.p() != null) {
         var1.c("c:minorGridlines", (String)null);
         this.a(var1, var2.t());
         var1.b();
      }

      String var3;
      if (var2.isVisible()) {
         var1.c("c:numFmt", (String)null);
         if (!var2.getTickLabels().getNumberFormatLinked()) {
            var3 = this.a(var2.getTickLabels());
            var1.a("formatCode", var3);
            var1.a("sourceLinked", "0");
         } else {
            var3 = this.a(var2.getTickLabels());
            var1.a("formatCode", var3);
            var1.a("sourceLinked", "1");
         }

         var1.b();
      }

      var3 = zase.r(var2.getMajorTickMark());
      a(var1, "majorTickMark", var3);
      var3 = zase.r(var2.getMinorTickMark());
      a(var1, "minorTickMark", var3);
      String var4 = zase.s(var2.getTickLabelPosition());
      if (zase.M(this.a.getType()) && var2.b() == 0 && this.a.c.getCount() > 0 && !this.a.c.a(0).L()) {
         var4 = "none";
      }

      a(var1, "tickLblPos", var4);
      this.a(var1, var2.r());
      if (!a(this.a.getChartArea().g(), var2.getTickLabels().a()) || var2.getTickLabels().getRotationAngle() != 0) {
         Font var5 = var2.getTickLabels().a();
         if (var5 == null && var2.getTickLabels().getRotationAngle() != 0) {
            var5 = var2.getTickLabels().getFont();
         }

         this.a(var1, var5, var2.getTickLabels().c(), var2.getTickLabels().getRotationAngle(), (DataLabels)null, var2.getTickLabels().e(), var2.getTickLabels().f(), var2.getTickLabels().getTextDirection());
      }

   }

   private void n(zcfx var1) throws Exception {
      Axis var2 = this.a.getSeriesAxis();
      var1.c("c:serAx", (String)null);
      a(var1, "axId", zase.y(var2.hashCode()));
      this.a(var1, var2, false);
      a(var1, "delete", var2.isVisible() ? "0" : "1");
      String var3 = "b";
      a(var1, "axPos", var3);
      this.a(var1, var2);
      Axis var4 = this.a.getValueAxis();
      a(var1, "crossAx", zase.y(var4.hashCode()));
      if (var4.getCrossType() != 2) {
         String var5 = zase.t(var4.getCrossType());
         a(var1, "crosses", var5);
      } else {
         double var7 = var4.getCrossAt();
         a(var1, "crossesAt", zase.b(var7));
      }

      if (!var2.l()) {
         a(var1, "tickLblSkip", zase.y(var2.getTickLabelSpacing()));
      }

      a(var1, "tickMarkSkip", zase.y(var2.getTickMarkSpacing()));
      var1.b();
   }

   private void a(zcfx var1, Axis var2, Axis var3, boolean var4, boolean var5) throws Exception {
      int var6 = var2.getCategoryType();
      if (var6 == 0 && "dateAx".equals(var2.d)) {
         var6 = 2;
      }

      if (var6 == 2) {
         var1.c("c:dateAx", (String)null);
      } else {
         var1.c("c:catAx", (String)null);
      }

      a(var1, "axId", zase.y(var2.hashCode()));
      this.a(var1, var2, false);
      a(var1, "delete", var2.isVisible() ? "0" : "1");
      String var7 = this.a(var2, var3, false, var5);
      a(var1, "axPos", var7);
      this.a(var1, var2);
      a(var1, "crossAx", zase.y(var3.hashCode()));
      String var8;
      if (var3.getCrossType() != 2) {
         var8 = zase.t(var3.getCrossType());
         a(var1, "crosses", var8);
      } else {
         double var10 = var3.getCrossAt();
         if (var4) {
            var10 *= 0.01D;
         }

         a(var1, "crossesAt", zase.b(var10));
      }

      if (var2.g) {
         if (var2.getCategoryType() == 0) {
            a(var1, "auto", "1");
         } else {
            a(var1, "auto", "0");
         }
      }

      if (var6 == 2) {
         a(var1, "lblOffset", zase.y(var2.getTickLabels().getOffset()));
         if (!var2.isBaseUnitAuto()) {
            var8 = zase.C(var2.getBaseUnitScale());
            a(var1, "baseTimeUnit", var8);
         }

         if (!var2.g()) {
            a(var1, "majorUnit", zase.b(var2.getMajorUnit()));
            var8 = zase.C(var2.getMajorUnitScale());
            a(var1, "majorTimeUnit", var8);
         }

         if (!var2.h()) {
            a(var1, "minorUnit", zase.b(var2.getMinorUnit()));
            var8 = zase.C(var2.getMinorUnitScale());
            a(var1, "minorTimeUnit", var8);
         }
      } else {
         a(var1, "lblOffset", zase.y(var2.getTickLabels().getOffset()));
         if (!var2.l()) {
            a(var1, "tickLblSkip", zase.y(var2.getTickLabelSpacing()));
         }

         if (var2.getTickMarkSpacing() != 1) {
            a(var1, "tickMarkSkip", zase.y(var2.getTickMarkSpacing()));
         }
      }

      a(var1, "noMultiLvlLbl", var2.hasMultiLevelLabels() ? "0" : "1");
      var1.b();
   }

   private String a(Axis var1, Axis var2, boolean var3, boolean var4) {
      String var5 = null;
      if (var3) {
         if (var1.b() == 0) {
            var5 = var2.isPlotOrderReversed() ? "t" : "b";
         } else if (var4) {
            var5 = var2.isPlotOrderReversed() ? "t" : "b";
         } else {
            var5 = var2.isPlotOrderReversed() ? "r" : "l";
         }
      } else if (var4) {
         var5 = var2.isPlotOrderReversed() ? "r" : "l";
      } else {
         var5 = var2.isPlotOrderReversed() ? "t" : "b";
      }

      return var5;
   }

   private void a(zcfx var1, Axis var2, Axis var3, boolean var4, boolean var5, boolean var6) throws Exception {
      var1.c("c:valAx", (String)null);
      a(var1, "axId", zase.y(var2.hashCode()));
      this.a(var1, var2, var4);
      a(var1, "delete", var2.isVisible() ? "0" : "1");
      String var7 = this.a(var2, var3, true, var5);
      a(var1, "axPos", var7);
      this.a(var1, var2);
      a(var1, "crossAx", zase.y(var3.hashCode()));
      String var8;
      if (var3.getCrossType() != 2) {
         var8 = zase.t(var3.getCrossType());
         a(var1, "crosses", var8);
      } else {
         a(var1, "crossesAt", zase.b(var3.getCrossAt()));
      }

      var8 = "midCat";
      if (!var6 && var3.getAxisBetweenCategories()) {
         var8 = "between";
      }

      a(var1, "crossBetween", var8);
      this.b(var1, var2);
      double var9;
      if (!var2.g()) {
         var9 = var2.getMajorUnit();
         if (var4) {
            var9 *= 0.01D;
         }

         a(var1, "majorUnit", zase.b(var9));
      }

      if (!var2.h()) {
         var9 = var2.getMinorUnit();
         if (var4) {
            var9 *= 0.01D;
         }

         a(var1, "minorUnit", zase.b(var9));
      }

      var1.b();
   }

   private void b(zcfx var1, Axis var2) throws Exception {
      if (var2.getDisplayUnit() != 0) {
         var1.c("c:dispUnits", (String)null);
         if (var2.getDisplayUnit() != 0) {
            if (var2.getDisplayUnit() != 10) {
               a(var1, "builtInUnit", zase.ai(var2.getDisplayUnit()));
            } else {
               a(var1, "custUnit", com.aspose.cells.b.a.zo.a(var2.getCustUnit()));
            }
         }

         if (var2.m() != null && var2.isDisplayUnitLabelShown()) {
            this.a(var1, var2.getDisplayUnitLabel());
         }

         var1.b();
      }

   }

   private void a(zcfx var1, DisplayUnitLabel var2) throws Exception {
      var1.c("c:dispUnitsLbl", (String)null);
      boolean var3 = var2.l();
      boolean var4 = var2.i() && var2.l();
      if (var2.t() && var2.y() == 2003 && !var2.isDefaultPosBeSet()) {
         var2.getChart().a(false, false);
      }

      this.a(var1, (ChartFrame)var2, (String)"edge", var3, var4, var2.isInnerMode());
      if (var2.getText() != null) {
         this.b(var1, var2);
      }

      this.a(var1, var2.getShapeProperties());
      if (!a(this.a.getChartArea().g(), var2.g())) {
         this.a(var1, var2.getFont(), false, var2.getRotationAngle(), (DataLabels)null, var2.A(), var2.B(), var2.getTextDirection());
      }

      var1.b();
   }

   private void b(zcfx var1, DisplayUnitLabel var2) throws Exception {
      if (var2.getText() != null && var2.getLinkedSource() != null) {
         var1.c("c:tx", (String)null);
         if (var2.getLinkedSource() != null) {
            String var3 = var2.z();
            this.a(var1, var2.getLinkedSource(), var3 != null ? new String[]{var3} : null);
         } else {
            var1.c("c:rich", (String)null);
            this.a(var1, var2.getTextVerticalAlignment(), false, var2.getRotationAngle(), var2.A(), var2.B(), var2.getTextDirection(), true);
            var1.b("a:lstStyle", (String)null);
            zoc var4 = zoc.a(var2, this.b);
            a(var1, var4);
            var1.b();
         }

         var1.b();
      }
   }

   private void o(zcfx var1) throws Exception {
      if (this.a.getShowLegend()) {
         Legend var2 = this.a.getLegend();
         var1.c("c:legend", (String)null);
         int var3 = var2.getPosition();
         if (var3 == 7 && !var2.B()) {
            var3 = 0;
         }

         String var4 = zase.q(var3);
         a(var1, "legendPos", var4);
         this.a(var1, var2);
         boolean var5 = var2.i() && var2.l();
         boolean var6 = var2.i() && var2.l();
         this.a(var1, (ChartFrame)var2, (String)"edge", var5, var6, var2.isInnerMode());
         if (!var2.isOverLay()) {
            a(var1, "overlay", "0");
         } else {
            a(var1, "overlay", "1");
         }

         this.a(var1, var2.getShapeProperties());
         if (!a(this.a.getChartArea().g(), var2.g())) {
            this.a(var1, var2.getFont(), false, 0, (DataLabels)null, false, false, 0);
         }

         var1.b();
      }
   }

   private void p(zcfx var1) throws Exception {
      if (this.a.getShowDataTable()) {
         ChartDataTable var2 = this.a.q();
         var1.c("c:dTable", (String)null);
         if (var2 == null) {
            a(var1, "showHorzBorder", "1");
            a(var1, "showVertBorder", "1");
            a(var1, "showOutline", "1");
            a(var1, "showKeys", "1");
         } else {
            if (var2.hasBorderHorizontal()) {
               a(var1, "showHorzBorder", "1");
            }

            if (var2.hasBorderVertical()) {
               a(var1, "showVertBorder", "1");
            }

            if (var2.hasBorderOutline()) {
               a(var1, "showOutline", "1");
            }

            if (var2.getShowLegendKey()) {
               a(var1, "showKeys", "1");
            }

            if (var2.c() != null) {
               this.a(var1, var2.d());
            }

            if (!a(this.a.getChartArea().g(), var2.a())) {
               this.a(var1, var2.getFont(), false, 0, (DataLabels)null, false, false, 0);
            }
         }

         var1.b();
      }
   }

   private void l(zcfx var1, ziz var2) throws Exception {
      String var3;
      String var4;
      if (!var2.m()) {
         var3 = zase.y(this.a.getCategoryAxis().hashCode());
         var4 = zase.y(this.a.getValueAxis().hashCode());
      } else {
         var3 = zase.y(this.a.getSecondCategoryAxis().hashCode());
         var4 = zase.y(this.a.getSecondValueAxis().hashCode());
      }

      a(var1, "axId", var3);
      a(var1, "axId", var4);
      if (ChartCollection.f(var2.j())) {
         String var5 = zase.y(this.a.getSeriesAxis().hashCode());
         a(var1, "axId", var5);
      }

   }

   private void a(zcfx var1, ErrorBar var2) throws Exception {
      var1.c("c:errBars", (String)null);
      String var3 = var2.a() ? "y" : "x";
      a(var1, "c", "errDir", var3);
      var3 = zase.E(var2.getDisplayType());
      a(var1, "c", "errBarType", var3);
      var3 = zase.F(var2.getType());
      a(var1, "c", "errValType", var3);
      if (var2.getType() == 0) {
         if (var2.b() != null) {
            var1.c("c:plus", (String)null);
            this.a(var1, var2.b(), false, false);
            var1.b();
         }

         if (var2.c() != null) {
            var1.c("c:minus", (String)null);
            this.a(var1, var2.c(), false, false);
            var1.b();
         }
      } else if (var2.getType() != 4) {
         a(var1, "c", "val", zase.b(var2.getAmount()));
      }

      if (!var2.getShowMarkerTTop()) {
         a(var1, "c", "noEndCap", "1");
      }

      this.a(var1, var2.e());
      var1.b();
   }

   private void a(zcfx var1, TrendlineCollection var2) throws Exception {
      for(int var3 = 0; var3 < var2.getCount(); ++var3) {
         Trendline var4 = var2.get(var3);
         var1.c("c:trendline", (String)null);
         if (!var4.isNameAuto()) {
            var1.b("c:name", var4.getName());
         }

         this.a(var1, var4.e());
         String var5 = zase.D(var4.getType());
         a(var1, "c", "trendlineType", var5);
         if (var4.getType() == 4) {
            a(var1, "c", "order", zase.y(var4.getOrder()));
         }

         if (var4.getType() == 3) {
            a(var1, "c", "period", zase.y(var4.getPeriod()));
         }

         if (var4.getType() != 3) {
            if (var4.getForward() != 0.0D) {
               a(var1, "c", "forward", zase.b(var4.getForward()));
            }

            if (var4.getBackward() != 0.0D) {
               a(var1, "c", "backward", zase.b(var4.getBackward()));
            }

            if (var4.getType() != 2 && var4.getType() != 5 && var4.getIntercept() != 0.0D) {
               a(var1, "c", "intercept", zase.b(var4.getIntercept()));
            }

            if (var4.getDisplayEquation()) {
               a(var1, "c", "dispEq", "1");
            } else {
               a(var1, "c", "dispEq", "0");
            }

            if (var4.getDisplayRSquared()) {
               a(var1, "c", "dispRSqr", "1");
            } else {
               a(var1, "c", "dispRSqr", "0");
            }
         }

         DataLabels var6 = var4.b();
         if (var6 != null) {
            var1.c("c:trendlineLbl", (String)null);
            if (!var6.j() || var6.s() || var6.t()) {
               this.a(var1, (DataLabels)var6, 2);
            }

            if (var6.z() != null && var6.z().length() > 0) {
               this.b(var1, var6, false);
            } else if (var6.D() != null || var6.getRotationAngle() != 0) {
               Font var7 = var6.g();
               if (var7 == null && var6.getRotationAngle() != 0) {
                  var7 = var6.getFont();
               }

               this.a(var1, var7, false, var6.getRotationAngle(), var6, var6.A(), var6.B(), var6.getTextDirection());
            }

            if (var6.I()) {
               var1.c("c:numFmt", (String)null);
               String var8 = this.a(var6);
               var1.a("formatCode", var8);
               if (var6.H()) {
                  var1.a("sourceLinked", "1");
               }

               var1.b();
            }

            boolean var9 = this.a(var1, var6.getShapeProperties());
            if (!var9 && var6.getRotationAngle() != 0) {
               var1.b("c:spPr", (String)null);
            }

            var1.b();
         }

         var1.b();
      }

   }

   private void a(zcfx var1, Legend var2) throws Exception {
      if (var2.A() != null) {
         int var3 = var2.getLegendEntries().getCount();
         if (var3 != 0) {
            for(int var4 = 0; var4 < var3; ++var4) {
               LegendEntry var5 = var2.getLegendEntries().b(var4);
               boolean var6 = a(var2.g(), var5.a());
               if (var5.isDeleted() || !var6) {
                  var1.c("c:legendEntry", (String)null);
                  int var7 = var5.c();
                  if (this.d != null) {
                     Object var8 = this.d.get(var7);
                     if (var8 != null) {
                        var7 = (Integer)var8;
                     }
                  }

                  a(var1, "idx", zase.y(var7));
                  if (var5.isDeleted()) {
                     a(var1, "delete", "1");
                  } else if (!var6) {
                     this.a(var1, var5.a(), false, 0, (DataLabels)null, false, false, 0);
                  }

                  var1.b();
               }
            }

         }
      }
   }

   private void g(zcfx var1, Series var2) throws Exception {
      if (var2.getName() != null && var2.getName().length() != 0) {
         var1.c("c:tx", (String)null);
         if (var2.getName().charAt(0) != '=') {
            var1.c("c:v", (String)null);
            var1.a(zase.a(var2.getName()));
            var1.b();
         } else {
            var1.c("c:strRef", (String)null);
            var1.c("c:f", (String)null);
            var1.a(var2.getName().substring(1));
            var1.b();
            if (var2.b != null) {
               var1.c("c:strCache", (String)null);
               var1.c("c:ptCount", (String)null);
               var1.a("val", "1");
               var1.b();
               var1.c("c:pt", (String)null);
               var1.a("idx", "0");
               var1.c("c:v", (String)null);
               var1.a(var2.b);
               var1.b();
               var1.b();
               var1.b();
            }

            var1.b();
         }

         var1.b();
      }
   }

   private void a(zcfx var1, String var2) throws Exception {
      var2 = zase.H(var2);
      var1.c("c:strRef", (String)null);
      var1.c("c:f", (String)null);
      var1.a(var2);
      var1.b();
      var1.b();
   }

   private void a(zcfx var1, String var2, String[] var3) throws Exception {
      var2 = zase.H(var2);
      var1.c("c:strRef", (String)null);
      var1.c("c:f", (String)null);
      var1.a(var2);
      var1.b();
      if (var3 != null && var3.length != 0) {
         var1.c("c:strCache", (String)null);
         var1.c("c:ptCount", (String)null);
         var1.a("val", zase.y(var3.length));
         var1.b();

         for(int var4 = 0; var4 < var3.length; ++var4) {
            var1.c("c:pt", (String)null);
            var1.a("idx", zase.y(var4));
            var1.b("c:v", var3[var4]);
            var1.b();
         }

         var1.b();
      }

      var1.b();
   }

   private void a(zcfx var1, int var2, boolean var3, int var4, boolean var5, boolean var6, int var7, boolean var8) throws Exception {
      var1.c("a:bodyPr", (String)null);
      if (var5) {
         if (var7 == 2) {
            var1.a("vert", "wordArtVertRtl");
         } else {
            var1.a("vert", "wordArtVert");
         }

         var1.a("rot", "0");
      } else if (var6) {
         var1.a("rot", "0");
         var1.a("vert", "eaVert");
      } else if (!var3) {
         var1.a("vert", "horz");
         var1.a("rot", zase.y(var4 * -60000));
      }

      if (!var8) {
         var1.a("wrap", "none");
      }

      var1.b();
   }

   private static void a(zcfx var0, int var1, int var2) throws Exception {
      var0.c("a:pPr", (String)null);
      if (var1 != 7) {
         String var3 = zase.B(var1);
         var0.a("algn", var3);
      }

      if (var2 == 2) {
         var0.a("rtl", "1");
      }

      var0.b("a:defRPr", (String)null);
      var0.b();
   }

   private void b(zcfx var1, Title var2) throws Exception {
      String var3 = var2.getLinkedSource();
      if (var3 != null || var2.getText() != null) {
         var1.c("c:tx", (String)null);
         if (var3 != null) {
            this.a(var1, var3);
         } else {
            var1.c("c:rich", (String)null);
            this.a(var1, var2.getTextVerticalAlignment(), false, var2.getRotationAngle(), var2.F(), var2.G(), var2.getTextDirection(), true);
            var1.b("a:lstStyle", (String)null);
            zoc var4 = zoc.a(var2, this.b);
            a(var1, var4);
            var1.b();
         }

         var1.b();
      }
   }

   static void a(zcfx var0, zoc var1) throws Exception {
      var0.c("a", "p", (String)null);
      a(var0, var1.b, var1.c);
      Font var2 = var1.d;
      if (var1.f != null && var1.f.size() != 0) {
         int var3 = var1.f.size();

         for(int var4 = 0; var4 < var3; ++var4) {
            FontSetting var5 = (FontSetting)var1.f.get(var4);
            if (var5.getLength() > 0) {
               if (var4 == 0 && var5.getStartIndex() != 0) {
                  a(var0, var2, var1.e.substring(0, 0 + var5.getStartIndex()), var1.g, var1.h, var1.a);
               }

               Font var6 = var5.c();
               if (var6 == null) {
                  var6 = var2;
               }

               int var7 = var5.getStartIndex();
               int var8 = var5.getLength();
               if (var1.e.length() < var7 + var8) {
                  var8 = var1.e.length() - var7;
               }

               if (var1.e.length() >= var7 + var8 && var8 > 0) {
                  String var9 = var1.e.substring(var7, var7 + var8);
                  a(var0, var6, var9, var1.g, var1.h, var1.a);
               }

               if (var4 == var3 - 1 && var5.getStartIndex() + var5.getLength() < var1.e.length()) {
                  a(var0, var2, var1.e.substring(var5.getStartIndex() + var5.getLength()), var1.g, var1.h, var1.a);
               }
            }
         }
      } else {
         a(var0, var2, var1.e, var1.g, var1.h, var1.a);
      }

      if (var1.i != null) {
         Object var10 = var1.i.a(1);
         if (var10 != null) {
            var0.d((String)var10);
         }
      }

      var0.b();
      var0.e();
   }

   static void b(zcfx var0, zoc var1) throws Exception {
      var0.c("a", "p", (String)null);
      a(var0, var1.b, var1.c);
      a(var0, var1.d, "endParaRPr", var1.g);
      var0.b();
      var0.e();
   }

   private void b(zcfx var1, DataLabels var2, boolean var3) throws Exception {
      boolean var4 = false;
      if (var3) {
         var4 = var2.S();
      }

      if (var2.z() != null || var2.n != null || var4) {
         var1.c("c:tx", (String)null);
         if (var2.getLinkedSource() != null) {
            String var5 = var2.z();
            this.a(var1, var2.getLinkedSource(), var5 != null ? new String[]{var5} : null);
         } else {
            var1.c("c:rich", (String)null);
            this.a(var1, var2.getTextVerticalAlignment(), false, var2.getRotationAngle(), var2.A(), var2.B(), var2.getTextDirection(), var2.o);
            var1.b("a:lstStyle", (String)null);
            zoc var6 = zoc.a(var2, this.b);
            var6.a = true;
            a(var1, var6);
            var1.b();
         }

         var1.b();
      }
   }

   private void a(zcfx var1, Font var2, boolean var3, int var4, DataLabels var5, boolean var6, boolean var7, int var8) throws Exception {
      if (var2 != null) {
         var1.c("c:txPr", (String)null);
         int var9 = 9;
         if (var5 != null) {
            var9 = var5.getTextVerticalAlignment();
         }

         this.a(var1, var9, var3, var4, var6, var7, var8, var5 == null ? true : var5.o);
         var1.b("a:lstStyle", (String)null);
         var1.c("a:p", (String)null);
         if (var2 != null) {
            var1.c("a:pPr", (String)null);
            if (var5 != null) {
               if (var5.getTextHorizontalAlignment() != 7) {
                  String var10 = zase.B(var5.getTextHorizontalAlignment());
                  var1.a("algn", var10);
               }

               if (var5.getTextDirection() == 2) {
                  var1.a("rtl", "1");
               }
            }

            a(var1, var2, "defRPr", this.b);
            var1.b();
         }

         var1.b();
         var1.b();
      }
   }

   private static void a(zcfx var0, Font var1, String var2, Workbook var3, String var4, boolean var5) throws Exception {
      if (var4 == null && var5) {
         switch(e.a(var2)) {
         case 0:
            var4 = "SERIESNAME";
            break;
         case 1:
            var4 = "CATEGORYNAME";
            break;
         case 2:
            var4 = "VALUE";
            break;
         case 3:
            var4 = "CELLRANGE";
            break;
         case 4:
            var4 = "PERCENTAGE";
         }
      }

      if (var4 != null) {
         var0.c("a", "fld", (String)null);
         var0.a("id", "{" + com.aspose.cells.b.a.zh.b().a((String)null, (com.aspose.cells.b.a.c.za)com.aspose.cells.b.a.c.za.b()) + "}");
         var0.a("type", var4);
      } else {
         var0.c("a", "r", (String)null);
      }

      a(var0, var1, "rPr", var3);
      var0.c("a", "t", (String)null);
      if (var2 != null) {
         var0.a(zase.a(var2));
      }

      var0.b();
      var0.b();
   }

   private static void a(zcfx var0, Font var1, String var2, Workbook var3) throws Exception {
      var0.c("a", var2, (String)null);
      var0.a("lang", "en-US");
      if (var1 != null) {
         if (var1.f(12)) {
            var0.a("sz", zase.y(var1.i() * 5));
         }

         if (var1.f(17)) {
            var0.a("b", var1.isBold() ? "1" : "0");
         }

         if (var1.f(18)) {
            var0.a("i", var1.isItalic() ? "1" : "0");
         }

         var0.a("u", zase.v(var1.getUnderline()));
         if (var1.getStrikeType() == 0) {
            var0.a("strike", "sngStrike");
         } else if (var1.getStrikeType() == 1) {
            var0.a("strike", "dblStrike");
         }

         var0.a("baseline", zase.y(a(var1)));
         if (var1.getCapsType() == 2) {
            var0.a("cap", "small");
         } else if (var1.getCapsType() == 1) {
            var0.a("cap", "all");
         }

         if (var1.isNormalizeHeights()) {
            var0.a("normalizeH", "1");
         }

         if (!var1.b.a()) {
            var0.c("a", "solidFill", (String)null);
            ztj.a(var0, var1.b, -1, var3);
            var0.b();
         }

         if (var1.f(13) || var1.getName() != null && "arial".equals(var1.getName().toLowerCase())) {
            a(var0, "a", "latin", "typeface", var1.getName());
            a(var0, "a", "ea", "typeface", var1.getName());
            a(var0, "a", "cs", "typeface", var1.getName());
         }
      }

      var0.b();
   }

   private void a(zcfx var1, zpx var2) throws Exception {
      var1.c("c:layout", (String)null);
      var1.c("c:manualLayout", (String)null);
      if (var2.a != null) {
         a(var1, "layoutTarget", var2.a);
      }

      if (var2.b != null) {
         a(var1, "xMode", var2.b);
      }

      if (var2.c != null) {
         a(var1, "yMode", var2.c);
      }

      if (var2.d != null) {
         a(var1, "wMode", var2.d);
      }

      if (var2.e != null) {
         a(var1, "hMode", var2.e);
      }

      if (var2.f != null) {
         a(var1, "x", var2.f);
      }

      if (var2.g != null) {
         a(var1, "y", var2.g);
      }

      if (var2.h != null) {
         a(var1, "w", var2.h);
      }

      if (var2.i != null) {
         a(var1, "h", var2.i);
      }

      var1.b();
      var1.b();
   }

   private void a(zcfx var1, ChartFrame var2, String var3, boolean var4, boolean var5, boolean var6) throws Exception {
      boolean var7 = var2 instanceof PlotArea;
      PlotArea var8 = null;
      if (var7) {
         var8 = (PlotArea)var2;
      }

      if (var2.c != null) {
         this.a(var1, var2.c);
      } else if (!var5 && this.a.getChartObject().getWidthPt() > 0.0D && this.a.getChartObject().getHeightPt() > 0.0D) {
         var1.c("c:layout", (String)null);
         var1.c("c:manualLayout", (String)null);
         if (var6) {
            a(var1, "layoutTarget", "inner");
         }

         a(var1, "xMode", var3);
         a(var1, "yMode", var3);
         double var9;
         double var11;
         if (var6 && var7) {
            a(var1, "x", zase.b((double)var8.getInnerX() / 4000.0D));
            a(var1, "y", zase.b((double)var8.getInnerY() / 4000.0D));
         } else {
            var9 = (double)var2.m() / 4000.0D;
            if (var9 < 0.0D) {
               var9 = 0.0D;
            }

            var11 = (double)var2.n() / 4000.0D;
            if (var11 < 0.0D) {
               var11 = 0.0D;
            }

            a(var1, "x", zase.b(var9));
            a(var1, "y", zase.b(var11));
         }

         if (!var4) {
            var9 = (double)var2.getWidth() / 4000.0D;
            var11 = (double)var2.getHeight() / 4000.0D;
            if (var6 && var7) {
               a(var1, "w", zase.b((double)var8.getInnerWidth() / 4000.0D));
               a(var1, "h", zase.b((double)var8.getInnerHeight() / 4000.0D));
            } else {
               a(var1, "w", zase.b(var9));
               a(var1, "h", zase.b(var11));
            }
         }

         var1.b();
         var1.b();
      } else {
         var1.b("c:layout", (String)null);
      }

   }

   private boolean a(zcfx var1, ShapePropertyCollection var2) throws Exception {
      return ztj.a(var1, this.c, var2);
   }

   private static void a(zcfx var0, String var1, String var2) throws Exception {
      var0.c("c:" + var1, (String)null);
      var0.a("val", var2);
      var0.b();
   }

   private static void a(zcfx var0, String var1, String var2, String var3) throws Exception {
      var0.c(var1 + ":" + var2, (String)null);
      var0.a("val", var3);
      var0.b();
   }

   private static void a(zcfx var0, String var1, String var2, String var3, String var4) throws Exception {
      var0.c(var1 + ":" + var2, (String)null);
      var0.a(var3, var4);
      var0.b();
   }

   private String a(TickLabels var1) {
      if (var1.getNumber() == 0 && var1.getNumberFormat() == null) {
         return "General";
      } else {
         return var1.getNumberFormat() != null ? var1.getNumberFormat() : zase.x(var1.getNumber());
      }
   }

   private String a(DataLabels var1) {
      if (var1.H()) {
         return "General";
      } else {
         return var1.F() != null ? var1.F() : zase.x(var1.G());
      }
   }

   private static int a(Font var0) {
      return var0.f();
   }

   private static boolean a(Font var0, Font var1) {
      if (var0 == null) {
         return var1 == null;
      } else {
         return var1 == null ? true : var0.a(var1);
      }
   }
}
